"use client";
import { Tabs } from "antd";
import React from "react";
import ArticleView from "./article-view";
import CreateArticle from "./create-article";
import UserComments from "./user-comments";
import UserAction from "./user-action";

export interface RecordProps {
  userInfo: API.GetUserInfoDto;
}
const Record: React.FC<RecordProps> = ({ userInfo }) => {

  return (
    <div className="mt-6">
      <Tabs
        defaultActiveKey="article-comments"
        items={[
          {
            label: "创作历史",
            children: <CreateArticle userInfo={userInfo} />,
            key: "article-create",
          },
          {
            label: "浏览历史",
            children: <ArticleView userInfo={userInfo} />,
            key: "article-view",
          },
          {
            label: "评论历史",
            children: <UserComments userInfo={userInfo} />,
            key: "user-comments",
          },
          {
            label: "行为历史",
            children: <UserAction userInfo={userInfo} />,
            key: "user-actions",
          },
        ]}
      />
    </div>
  );
};
export default Record;
